export const findTypeByValue = (type, originType) => {
  return originType.find(item => item.value == type) || originType.find(item => item.label == type)
}

export const findTypeByLabel = (type, originType) => {
  return originType.find(item => item.label == type) || originType.find(item => item.value == type)
}

export const userType = [{
  value: '0',
  label: '患者',
  key: 'patient'
}, {
  value: '1',
  label: '医生',
  key: 'doctor'
}, {
  value: '2',
  label: '患教',
  key: 'teacher'
}]

export const classifyType = [{
    value: 'send',
    label: '我发送的',
    key: 'sendTask'
  },
  {
    value: 'receive',
    label: '我接收的',
    key: 'receiveTask'
  }
]

export const taskCountType = [{
    value: 'today',
    label: '今日任务',
    key: 'TodayTask'
  },
  {
    value: 'week',
    label: '本周任务',
    key: 'WeekTask'
  },
  {
    value: 'progress',
    label: '待完成任务',
    key: 'EndTask'
  },
  {
    value: 'delay',
    label: '延期任务',
    key: 'DelayTask'
  }
]

export const taskType = [{
  value: '0',
  label: '正念练习'
}, {
  value: '1',
  label: '用药提醒'
}, {
  value: '2',
  label: '复查复诊'
}, {
  value: '3',
  label: '冥想'
}]

export const frequencyType = [{
  value: 1,
  label: '1天/次'
}, {
  value: 2,
  label: '2天/次'
}]

export const payType = [{
  value: '0',
  label: '公费'
}, {
  value: '1',
  label: '医保'
}, {
  value: '2',
  label: '新农合'
}, {
  value: '3',
  label: '自费'
}, {
  value: '4',
  label: '其他'
}]

export const patientGroupingType = [{
  value: '0',
  label: '初治'
}, {
  value: '1',
  label: '复发'
}, {
  value: '2',
  label: '难治'
}]

export const articleType = [{
    value: '0',
    label: '图文'
  },
  {
    value: '1',
    label: '视频'
  }
]

export const articleFilterType = [{
    value: '-1',
    label: '全部'
  },
  {
    value: '0',
    label: '图文'
  },
  {
    value: '1',
    label: '视频'
  }
]

export const showType = [{
    value: '1',
    label: '公开'
  },
  {
    value: '0',
    label: '隐藏'
  }
]

export const pathologicalStagingType = [
  {
    value: '0',
    label: 'I期'
  },{
    value: '1',
    label: 'Ⅱ期'
  },{
    value: '2',
    label: 'Ⅲ期'
  },{
    value: '3',
    label: 'Ⅳ期'
  }
]

export const illnessType = [
  {
    value: '0',
    label: '肺癌'
  },{
    value: '1',
    label: '乳腺癌'
  },{
    value: '2',
    label: '结直肠癌'
  },{
    value: '3',
    label: '胃癌'
  },{
    value: '4',
    label: '肝癌'
  },{
    value: '5',
    label: '膀胱癌'
  },{
    value: '6',
    label: '前列腺癌'
  },{
    value: '7',
    label: '宫颈癌'
  },{
    value: '8',
    label: '胰腺癌'
  },{
    value: '9',
    label: '鼻咽癌'
  },{
    value: '10',
    label: '食道癌'
  },{
    value: '11',
    label: '胆管癌'
  },{
    value: '12',
    label: '卵巢癌'
  },{
    value: '13',
    label: '多发性骨髓瘤'
  },{
    value: '14',
    label: '淋巴瘤'
  },{
    value: '15',
    label: '白血病'
  },{
    value: '16',
    label: '其他'
  }
]
